package Test03;

public class SalariedEmploye extends Employee{
	
	/*定义SalariedEmployee类继承Employee类，实现按月计算工资的员工处理。
	该类包括：private成员变     量monthlySalary； 实现父类的抽象方法earnings(),
	该方法返回monthlySalary值；toString()方法输 出员工类型信息及员工的name，number,birthday。*/

	private double monthlySalary;
	
	
	
	
	public SalariedEmploye() {

	}


	public SalariedEmploye(String name, int number, MyDate my,double monthlySalar) {
		super(name, number, my);
		this.monthlySalary = monthlySalar; 
	}


	@Override
	public double earnings() {
		
		return monthlySalary;
	}


	public double getMonthlySalary() {
		return monthlySalary;
	}


	public void setMonthlySalary(double monthlySalary) {
		this.monthlySalary = monthlySalary;
	}


	@Override
	public String toString() {
		return "月工资为：" + getMonthlySalary() + ", " + super.toString() ;
				
	}
	
	
	
	

}
